package model

import (
	"gorm.io/gorm"
	"time"
)

// 收藏
type Like struct {
	Id        uint           `gorm:"column:id;type:int UNSIGNED;primaryKey;not null;" json:"id"`
	UserId    uint           `gorm:"column:user_id;type:int UNSIGNED;comment:用户id;not null;default:0;" json:"user_id"` // 用户id
	GoodId    uint           `gorm:"column:good_id;type:int UNSIGNED;comment:商品id;not null;default:0;" json:"good_id"` // 商品id
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}
